#ifndef _SIMCONNDATA_
#define _SIMCONNDATA_

#define MAX_REGS	32

#define PACKID_BP_MET			1
#define PACKID_CONTINUE			2
#define PACKID_BP_SET			3
#define PACKID_BP_SET_RET		4
#define PACKID_BP_REMOVE		5
#define PACKID_BP_REMOVE_RET	6
#define PACKID_MEM_DUMP			7
#define PACKID_MEM_DUMP_RET		8
#define PACKID_REG				9
#define PACKID_REG_RET			10

struct pack_bp_met {
	int id;
};

struct pack_bp_set {
	int type;
	int datasize;
};

struct pack_bp_set_ret {
	int ret;
	int id;
};

struct pack_bp_remove {
	int id;
};

struct pack_bp_remove_ret {
	int ret;
};

struct pack_mem_dump {
	unsigned int addr;
	int size;
};

struct pack_mem_dump_ret {
	int ret;
};

struct pack_reg_ret {
	int ret;
	int nreg;
	unsigned int regs[MAX_REGS];
};

void read_data(int fd, void *data, int size);
int read_pack(int fd, int *packid, void *pack, int size, int wait_second);
int write_pack(int fd, int packid, void *pack, int size);

#endif
